package com.wyd.entity;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

@Data
public class Context {
    private DseApplySimReq req;

    /************产品排序字段相关************/
    private BigDecimal cost; //配置的成本
    private BigDecimal availability; //配置的可用率
    private Integer plmnStrength; //配置的mtk信号级别
    private Integer netWorkType; //配置的网络制式

    private List<DseProductPriorityInfo> dseProductList; //dse产品列表

    private Map<Integer,Integer> weightTypeRuleMap = new ConcurrentHashMap<>(); //配置的规则项

    /************产品过滤字段相关************/
    private List<String> priorityDseProductIdList; //用户权益配置的优先级产品
    private List<String> forbidDseProductIdList; //用户权益配置的禁止产品
    private List<String> terminalForbidDseProductIdList; //设备配置的禁止产品
    private Integer unsettledAssignStatus; //未配置"是否禁止"卡产品分配状态：字段设置为默认禁止（0）则过滤
    private String appointMnc;//申请指定运营商信号，plmn
    private Set<Integer> netWorkTypeSet;//终端参数plmns（plmn/网络制式/强度）计算所得
    private Map<String,Integer> availableTypeMap;  //key:dse产品id,value:0:普通可用(默认), 1:全部可用

    public Context() {}

    public Context(BigDecimal cost, BigDecimal availability, Integer plmnStrength, Integer netWorkType, List<String> priorityDseProductIdList,
                   List<DseProductPriorityInfo> dseProductList, Map<Integer, Integer> weightTypeRuleMap) {
        this.cost = cost;
        this.availability = availability;
        this.plmnStrength = plmnStrength;
        this.netWorkType = netWorkType;
        this.priorityDseProductIdList = priorityDseProductIdList;
        this.dseProductList = dseProductList;
        this.weightTypeRuleMap = weightTypeRuleMap;
    }

    public Context(List<String> priorityDseProductIdList, List<String> forbidDseProductIdList, List<String> terminalForbidDseProductIdList,
                   Integer unsettledAssignStatus, String appointMnc, Set<Integer> netWorkTypeSet, Map<String, Integer> availableTypeMap) {
        this.priorityDseProductIdList = priorityDseProductIdList;
        this.forbidDseProductIdList = forbidDseProductIdList;
        this.terminalForbidDseProductIdList = terminalForbidDseProductIdList;
        this.unsettledAssignStatus = unsettledAssignStatus;
        this.appointMnc = appointMnc;
        this.netWorkTypeSet = netWorkTypeSet;
        this.availableTypeMap = availableTypeMap;
    }
}
